<?php
namespace app\admin\model;

use think\Model;

class Manager extends Model
{
	
	public function getFreezeAttr($value)
    {
        $freeze = [-1=>'删除',0=>'禁用',1=>'正常',2=>'待审核'];
        return $freeze[$value];
    }	
	public function profile()
	{
		 return $this->hasOne('manager_detail');
	}
	
	public function roles()
	{
		return $this->belongsToMany('Role','manager_role','id','shop_manager_id');
	}
	

}